package com.example.shop

import android.widget.CheckBox
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.CartEntityItem
import com.example.base.utils.GlideUtils

class CartAdapter:BaseQuickAdapter<CartEntityItem,BaseViewHolder>(R.layout.item_cart) {

    override fun convert(helper: BaseViewHolder, item: CartEntityItem) {
        helper.getView<CheckBox>(R.id.cart_cb).isChecked = item.isChecked/////////
        GlideUtils.loadNormal(context,item.image,helper.getView(R.id.cart_image))
        helper.setText(R.id.cart_name,item.storeName)
        helper.setText(R.id.cart_suk,item.suk)
        helper.setText(R.id.cart_price,"￥${item.price}")
        helper.setText(R.id.cart_num,item.cartNum.toString())////////
    }
}